package com.ly.integral.consumer;

import com.alibaba.fastjson.TypeReference;
import com.domain.Order;
import com.ass.rocketmq.constant.MQTopic;
import com.ass.rocketmq.consumer.AbstractConcurrencyPushConsumer;
import lombok.Getter;
import org.springframework.stereotype.Component;


@Component
public class OrderTransactionConsumer extends AbstractConcurrencyPushConsumer<Order> {


    @Getter
    private final TypeReference<Order> model = new TypeReference<Order>(){};

    @Getter
    private final MQTopic mqTopic = MQTopic.ORDER_TRANSACTION_ONE;


    @Override
    protected void handler(Order model, String keys) {
        System.out.println("消费者监听："+model);
    }

}
